[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Function            variance - calculate the variance of a set of
                                   reals

  Syntax              double variance(int n, double element[]);

  Prototype in        mathhk.h

  Remarks             variance calculates the variance of a set of n
                      numbers of type double.

  Return value        returns the variance of a set of n numbers.

  See also            average(), stddev(), summation()

  Example             #include <mathhk.h>

                      main()
                      {
                           double num[] = { 2.3, 7.1, 6.05 };

                           printf("Variance is %lf\n",variance(3,num));
                      }

  Program output      Variance is 4.245


See Also: average() stddev() summation()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson